//
//  CMDBSocialHorBtn.swift
//  CMDB
//
//  Created by 曹桂祥 on 17/5/3.
//  Copyright © 2017年 CMDB. All rights reserved.
//

import UIKit

class CMDBSocialHorBtn: UIButton {

    var nameLabel : UILabel!

    var numLabel  : UILabel!
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        buildSubViews()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
}

extension CMDBSocialHorBtn{
    
    override func buildSubViews() {
        
        nameLabel = UILabel()
        
        nameLabel.font = CMDB_12_FONT
        
        nameLabel.textAlignment = .Center
        
        nameLabel.textColor = UIColor.whiteColor()
        
        nameLabel.text = "关注"
        
        nameLabel.sizeToFit()
        
        addSubview(nameLabel)
        
        numLabel = UILabel()
        
        numLabel.font = CMDB_12_Bold_FONT
        
        numLabel.textColor = UIColor.whiteColor()
        
        numLabel.text = "000"
        
        numLabel.textAlignment = .Center
        
        numLabel.sizeToFit()
        
        addSubview(numLabel)
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        
        nameLabel.x = 0
        
        nameLabel.y      = 0
        
        numLabel.x    = CGRectGetMaxX(nameLabel.frame) + 3
        
        numLabel.y          = 0
        
    }

    
}
